from django.urls import reverse
from django.contrib.contenttypes.models import ContentType
from django.db import models as models


class news(models.Model):

    # Fields
    name = models.CharField(max_length=255)


    class Meta:
        ordering = ('-pk',)

    def __unicode__(self):
        return u'%s' % self.pk

    def get_absolute_url(self):
        return reverse('news_news_detail', args=(self.pk,))


    def get_update_url(self):
        return reverse('news_news_update', args=(self.pk,))


